#ifndef __WriteFile_hpp__
#define __WriteFile_hpp__

#include "OutputStream.hpp"

namespace ge {

GE_DECLARE_CLASS( WriteFile );

//----------------------------------------------------------------------------//
// WriteFile
//----------------------------------------------------------------------------//

class WriteFile : public virtual OutputStream
{
 friend class FileSystem;

 public:

     virtual uint Write( const void* _src, uint _size );
     
     virtual uint WriteTo( uint _offset, const void* _src, uint _size );

     virtual void Flush( void );

     virtual void ToEnd( void );

 protected:

     WriteFile( void );

     virtual ~WriteFile( void );

     void _Rewrite( const String& _path ); // for FileSystem 

     void _Append( const String& _path ); // for FileSystem 

     virtual void _ApplyPos( void );

     void* m_handle;
};

} // namespace ge

#endif//__WriteFile_hpp__
